import {
  ProForm,
  ProFormRadio,
  ProFormText,
  ProFormSelect,
  ProFormTextArea,
  ProFormUploadButton,
} from "@ant-design/pro-components";
import { Button } from 'antd';
import ProEditor from "@/components/Editor";
import CitySelect from '@/components/CitySelect';
import { SeatTypes, StatusTypes, PriceTypes, TipTypes } from './enum';

type BasicFormProps = {

}

const BasicForm = () => {
  return (
    <ProForm
      layout="vertical"
      submitter={false}
    >
      <ProFormText
        required
        label="项目名称"
        name="itemName"
      />
      <ProFormSelect
        required
        label="项目类型"
        name="itemType"
      />
      <ProForm.Item
        required
        label="场馆"
        name="session"
      >
        <CitySelect />
      </ProForm.Item>
      <ProFormRadio.Group
        required
        label="座位类型"
        name="seatType"
        valueEnum={SeatTypes}
        extra="座位类型保存后不可更改，请谨慎选择。"
      />
      <ProFormRadio.Group
        required
        label="项目状态"
        valueEnum={StatusTypes}
      />
      <ProFormText
        required
        label="客服电话"
        tooltip="此处填写的电话号码，在售票界面可被顾客吊起来直接拨打。"
      />
      <ProFormUploadButton
        max={1}
        required
        label="项目封面"
        listType="picture-card"
        extra="不超过 2M，建议尺寸260*375。支持.jpg,.png"
      />
      <ProFormUploadButton
        required
        label="项目海报"
        listType="picture-card"
        extra="不超过 2M，建议尺寸260*375。支持.jpg,.png"
      />
      <ProFormRadio.Group
        required
        label="显示价格"
        valueEnum={PriceTypes}
      />
      <ProFormTextArea
        required
        label="演出介绍导言"
      />
      <ProForm.Item
        required
        label="演出介绍"
      >
        <ProEditor />
      </ProForm.Item>
      <ProForm.Item
        required
        label="购票须知"
      >
        <ProEditor />
      </ProForm.Item>
      <ProFormRadio.Group
        label="购票提示（选填）"
        valueEnum={TipTypes}
        tooltip="此处填写的信息，将在售票页面指定位置弹出您填写的内容。"
      />
      <ProFormText
        label="备注（选填）"
      />
      <div style={{ textAlign: 'right' }}>
        <Button type="primary">保存</Button>
      </div>
    </ProForm>
  );
}

export default BasicForm;